#ifndef MYDELEGATE_H
#define MYDELEGATE_H
#include "mymodel.h"
#include <QItemDelegate>
#include <QWidget>
#include <QTableView>
class MyDelegate : public QItemDelegate
{
    Q_OBJECT
public:
    MyDelegate(QTableView* v,MyModel* m,QObject *parent = NULL);
    QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, \
                            const QModelIndex &index) const;
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
    void setModelData(QWidget *editor, QAbstractItemModel *model, \
                            const QModelIndex &index) const;
    void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option,\
                            const QModelIndex &index) const;
    void paint(QPainter *painter, const QStyleOptionViewItem &option, \
                            const QModelIndex &index) const;
signals:

public slots:
    void combox_slot(QString);
private:
    QTableView* view;
    MyModel* mode;
};

#endif // MYDELEGATE_H
